;var ImagePreview = function () {

	var NAME = 'imagePreview';
	var DATA_KEY = 'imagePreview';
	var EVENT_KEY = '.' + DATA_KEY;
	var DATA_API_KEY = '.data-api';
	var JQUERY_NO_CONFLICT = $.fn[NAME];

	var Default = {
		action: 'tab-action',
		tabListContainer: '.tab-list-container',
		tabList: ' .tab-list',
		tab: ' .tab',
		tabOpener: '',
		tabActiveClass: 'active',
		tabPanelContainer: '.tab-panel-container',
		tabPanel: 'iframe',

		attrUrl: 'href',
		attrDismiss: 'data-dismiss',
		attrTarget: 'data-target',
		tabTemplate: '<a class="tab active" href="{1}">{0}{2}</a>',
		tabClose: '<i class="fa fa-times-circle"></i>',
		panelTemplate: '<iframe src="{0}" width="100%" height="100%" frameborder="0" seamless></iframe>',
	};

	var TabUtil = function ($) {
		function format() {
			var args = arguments;
			var str = args[0];
			return str.replace(/\{(\d+)\}/g, function (s, i) {
				return args[parseInt(i) + 1];
			});
		}
	};

	var Option = {
		Url: 'url',
		Name: 'name',
		Dismiss: 'dismiss'
	};

	var DynamicTab = function () {
		var dataTabAction = '[data-{0}="{1}"]';

		function DynamicTab(element, config) {
			this._element = element;
			this._config = $.extend({}, Default, config);
			this.init();
		}
	}
};